package com.sky.context;

public class BaseContext {
    private static final ThreadLocal<Long> userIdContext = new ThreadLocal<>();

    public static void setCurrentId(Long id) {
        userIdContext.set(id);
    }

    public static Long getCurrentId() {
        return userIdContext.get();
    }

    public static void clear() {
        userIdContext.remove();
    }
}